﻿using System;
using System.Collections.Generic;

namespace BlamanticUI.Components;

/// <summary>
/// Represents a service to show toast.
/// </summary>
public interface IToastService
{
    /// <summary>
    /// Shows toast by specified setting action.
    /// </summary>
    /// <param name="setting">The setting of toast.</param>
    void Show(ToastSetting setting);

    ToastSetting Setting { get; }

    /// <summary>
    /// Occurs when toast has changed.
    /// </summary>
    event Action OnToastUpdating;

    IDictionary<string, ICollection<ToastController>> Toasters { get; }

    void Add(ToastController conrtoller);
    void Remove(ToastController conrtoller);

    void Clear();
}
